#pragma once
#include "VulkanDevice.h"

namespace Alice
{
    struct VulkanTextureView
    {
        VkImageView View   = VK_NULL_HANDLE;
        VkImage     Image  = VK_NULL_HANDLE;
        uint32      ViewId = 0;
    };
    class CGIVulkanView
    {
    public:
        VulkanDevice& mDevice;
        VulkanTextureView mTextureView;
        CGIVulkanView(VulkanDevice& InDevice, VkDescriptorType InDescriptorType);
        CGIVulkanView* InitAsTextureView(
          VkImage InImage
        , VkImageViewType ViewType
        , VkImageAspectFlags AspectFlags
        , EPixelFormat UEFormat
        , VkFormat Format
        , uint32 FirstMip
        , uint32 NumMips
        , uint32 ArraySliceIndex
        , uint32 NumArraySlices
        , bool bUseIdentitySwizzle = false
        , VkImageUsageFlags ImageUsageFlags = 0
        , VkSamplerYcbcrConversion SamplerYcbcrConversion = nullptr);
        VulkanTextureView const& GetTextureView () const { return mTextureView; }
    };
}
